package com.qianf.qfoffice.service.impl;

import com.github.pagehelper.PageHelper;
import com.qianf.qfoffice.dao.VipDao;
import com.qianf.qfoffice.entity.Vip;
import com.qianf.qfoffice.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class VipServiceImpl implements VipService {

    @Autowired
    private VipDao vipDao;

    @Override
    public int addVip(Vip vip) {
        return vipDao.addVip(vip);
    }

    @Override
    public List<Vip> findAllVip(Integer page,Integer limit) {

        PageHelper.startPage(page,limit);

        return vipDao.findAllVip();
    }
}
